import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
	{
		path:'/',
		redirect:'/login'
	},
	{
	  path: '/login',
	  name:'login',
	  component: ()=>import('../views/Login.vue')
	},
	{
	  path: '/register',
	  name:'register',
	  component: ()=>import('../views/Register.vue')
	},
	{
	  path: '/main',
	  name:'main',
	  component: ()=>import('../views/Main.vue'),
	  children:[
		  {
			  path:'/',
			  redirect:'/home'
		  },
		  {
			  path:'/home',
			  name:'home',
			  component:()=>import('../views/Home.vue')
		  },
		  {
			  path:'/community',
			  name:'community',
			  component:()=>import('../views/Community.vue')
		  },
		  {
			  path:'/shop',
			  name:'shop',
			  component:()=>import('../views/Shop.vue')
		  },
		  {
			  path:'/post',
			  name:'post',
			  component:()=>import('../views/Post.vue')
		  },
		  {
			  path:'/goods',
			  name:'goods',
			  component:()=>import('../views/Goods.vue')
		  },
		  {
			  path:'/orders',
			  name:'orders',
			  component:()=>import('../views/Orders.vue')
		  },
		  {
			  path:'/panghugoods',
			  name:'panghugoods',
			  component:()=>import('../views/panghuGoods.vue')
		  },
		  {
		    path:'/housekeeping',
		    name:'housekeeping',
		    component:()=>import('../views/Housekeeping.vue')
		  },
	  ]
	},
	
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('../views/AboutView.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
